<template>
  <!-- 总的品牌详情 -->
  <div>
    <navbar />
    <div class="banner">
      <img :src="brand.list_pic_url" alt="" />
      <h2>{{ brand.name }}</h2>
    </div>
    <p>{{ brand.simple_desc }}</p>
  </div>
</template>

<script>
import axios from "axios";
import Navbar from "./Home/Navbar.vue";

export default {
  components: { Navbar },
  name: "Bramd",
  data() {
    return {
      brand: {},
    };
  },
  created() {
    axios({
      method: "get",
      url: "http://localhost:8080/api/getBrand",
      params: {
        id: this.$route.params.id,
      },
    }).then((res) => {
      this.brand = res.data;
    });
    axios({
      method: "get",
      url: "http://192.168.33.238:8080/api/getBrand",
      params: {
        id: this.$route.params.id,
      },
    }).then((res) => {
      this.brand = res.data;
    });
  },
};
</script>

<style lang = "less" scoped>
.banner {
  width: 100%;
  position: relative;
  img {
    display: block;
    width: 100%;
  }
  h2 {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    height: 30px;
    line-height: 30px;
    margin: auto;
    font-size: 20px;
    text-decoration: underline;
    color: #fff;
  }
}
p {
  background: #fff;
  font-size: 18px;
  text-align: center;
  padding: 20px 10px;
  line-height: 26px;
  color: #666;
}
</style>